f7970cb084e9a1852587118c13d47b9e0889e359,opennms-services/src/test/java/org/opennms/netmgt/threshd/ThresholdingVisitorTest.java,ThresholdingVisitorTest,testBug3193,#,489

Before Change


         * For Java6, first add 'myCounter' then 'myCounter - 30'
         * Is this related to thresholds.xml parsing ?
         */
        addHighThresholdEvent(1, 100, 90, 110, "Unknown", null, "myCounter", null, null);
        addHighThresholdEvent(1, 70, 60, 80, "Unknown", null, "myCounter - 30", null, null);
        addHighRearmEvent(1, 100, 90, 40, "Unknown", null, "myCounter", null, null);
        addHighRearmEvent(1, 70, 60, 10, "Unknown", null, "myCounter - 30", null, null);
        
        // Collect Step 1 : First Data: Last should be NaN
        SnmpCollectionResource resource = new NodeInfo(resourceType, agent);

After Change


        SnmpAttributeType attributeType = new NumericAttributeType(resourceType, "default", mibObject, new AttributeGroupType("mibGroup", "ignore"));

        // Add Events (see note above)
        if (System.getProperty("java.specification.version").equals("1.6")) {
            addHighThresholdEvent(1, 70, 60, 80, "Unknown", null, "myCounter - 30", null, null);
            addHighThresholdEvent(1, 100, 90, 110, "Unknown", null, "myCounter", null, null);
            addHighRearmEvent(1, 70, 60, 10, "Unknown", null, "myCounter - 30", null, null);            
            addHighRearmEvent(1, 100, 90, 40, "Unknown", null, "myCounter", null, null);
        } else {
            addHighThresholdEvent(1, 100, 90, 110, "Unknown", null, "myCounter", null, null);
            addHighThresholdEvent(1, 70, 60, 80, "Unknown", null, "myCounter - 30", null, null);
            addHighRearmEvent(1, 100, 90, 40, "Unknown", null, "myCounter", null, null);
            addHighRearmEvent(1, 70, 60, 10, "Unknown", null, "myCounter - 30", null, null);
        }
        
        // Collect Step 1 : First Data: Last should be NaN